import moment from 'moment'

/**
 * Upper case first char
 * @param {String} string
 */
export default function asDatetime(timestrap, locale = null) {
  if (timestrap > 0) {
    return moment(timestrap * 1000)
      .locale('zh-cn')
      .format('YYYY/MM/DD HH:mm:ss')
    // .format('LL LTS')
  } else {
    return '-'
  }
}
